package com.example.walletdemo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel(value = "消费记录对象",description = "消费记录表")
public class Record {

    @ApiModelProperty("消费id")
    private int rid;

    @ApiModelProperty("金额")
    private double money;

    @ApiModelProperty("余额")
    private double balance;

 /*   1：表示消费
    2：表示退款
    3：表示充值
    4：表示体现*/
    @ApiModelProperty("类型")
    private String rType;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("用户id")
    private int wid;

}
